<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }

        .box{
            background-color: burlywood;
            /* padding: 50px; */
            /* 就算父元素的宽度和高度不设置的话，增加父元素的
            padding也会增加父元素的实际宽高 */
        }
        .box1{
            width: 300px;
            height: 300px;
            background-color: chartreuse;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="box1"></div>
    </div>
</body>
</html>